package logic;

public class ArrayComparer {

	public ArrayComparer(){}
	
	public int[] sumIntArray(int[] array1, int[] array2) throws ArraySizeException{
		if(array1.length != array2.length){
			throw new ArraySizeException(	"Array size mismatch! \n" + 
											"Array1 size : " + array1.length + 
											"\n" +
											"Array2 size : " + array2.length);
		}else{
			int[] toReturn = new int[array1.length];
			for(int i = 0; i < array1.length; i++){
				toReturn[i] = (array1[i] + array2[i]);
			}
			
			return toReturn;
		}
	}
}
